<?php

namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "{{%patient_hospital_record}}".
 *
 * @property int $id
 * @property int|null $project_id 项目id
 * @property string|null $patient_card_id 诊疗号
 * @property int|null $in_hospital_time 住院/出院时间戳
 * @property int|null $in_hospital_serial 住院serial_no
 * @property int|null $type 1 = 入院 2 = 出院
 * @property int|null $created_at
 * @property int|null $updated_at
 */
class HospitalRecord extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%patient_hospital_record}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'in_hospital_time', 'in_hospital_serial', 'type', 'created_at', 'updated_at'], 'integer'],
            [['patient_card_id'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => 'Project ID',
            'patient_card_id' => 'Patient Card ID',
            'in_hospital_time' => 'In Hospital Time',
            'in_hospital_serial' => 'In Hospital Serial',
            'type' => 'Type',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
